package money_model

import (
	"base"
	"proto/money"
)

type Money struct {
	PlayerId base.PlayerId
	GoldCoin base.AssetItemCount // 金币
	Diamond  base.AssetItemCount // 钻石
}

func NewMoney(playerId base.PlayerId) *Money {
	result := new(Money)
	result.PlayerId = playerId

	return result
}

func (money *Money) ToProto() *proto_money.Item {
	result := new(proto_money.Item)
	result.GoldCoin = money.GoldCoin
	result.Diamond = money.Diamond

	return result
}
